package org.jeecg.modules.charge.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.charge.entity.ChargeSubjects;
import org.jeecg.modules.charge.mapper.ChargeSubjectsMapper;
import org.jeecg.modules.charge.service.IChargeSubjectsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;
import java.util.Map;

/**
 * @Description: 会计科目
 * @Author: jeecg-boot
 * @Date:   2019-06-27
 * @Version: V1.0
 */
@Service
public class ChargeSubjectsServiceImpl extends ServiceImpl<ChargeSubjectsMapper, ChargeSubjects> implements IChargeSubjectsService {
    @Autowired
    private  ChargeSubjectsMapper  chargeSubjectsMapper;
    @Override
    public List<ChargeSubjects> getOneSubjects() {
        return chargeSubjectsMapper.getOneSubjects();
    }

    @Override
    public Page<ChargeSubjects> listByParams(Page<ChargeSubjects> page, Map map) {
        return page.setRecords(chargeSubjectsMapper.listByParams(page,map));
    }

    @Override
    public ChargeSubjects getBySubjectsCode(String subjectsCode) {
        return chargeSubjectsMapper.getBySubjectsCode(subjectsCode);
    }
}
